package com.ruoyi.framework.web.service;

import java.util.List;

import com.ruoyi.system.domain.*;
import com.ruoyi.system.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * RuoYi首创 html调用 thymeleaf 实现字典读取
 * 
 * @author ruoyi
 */
@Service("dict")
public class DictService
{
    @Autowired
    private ISysDictDataService dictDataService;
    @Autowired
    private IShangjiatypeService shangjiatypeService;
    @Autowired
    private IBusinessinfoService businessinfoService;
    @Autowired
    private IComplainttypeService complainttypeService;
    @Autowired
    private ICheyouhuiService cheyouhuiService;
    /**
     * 根据字典类型查询字典数据信息
     * 
     * @param dictType 字典类型
     * @return 参数键值
     */
    public List<SysDictData> getType(String dictType)
    {
        return dictDataService.selectDictDataByType(dictType);
    }

    /**
     * 根据字典类型和字典键值查询字典数据信息
     * 
     * @param dictType 字典类型
     * @param dictValue 字典键值
     * @return 字典标签
     */
    public String getLabel(String dictType, String dictValue)
    {
        return dictDataService.selectDictLabel(dictType, dictValue);
    }
    /**
     * 查询商家类型列表
     *
     *
     * @return 商家类型集合
     */
    public List<Shangjiatype> selectBusinesstypeList(){
        Shangjiatype shangjiatype = null;
        return shangjiatypeService.selectBusinesstypeList(shangjiatype);
    }

    /**
     * 客户投诉表模糊查询商家列表
     * @return 商家列表
     */
    public List<Businessinfo> selectBusinessTypeList(){
        Businessinfo businessinfo = null;
        return businessinfoService.selectBusinessinfoList2(businessinfo);
    }

    /**
     * 客户投诉表模糊查询投诉类型列表
     * @return 投诉列表
     */
    public List<Complainttype> selectComplaintypesByBussinessId(){
        return complainttypeService.selectComplainttypeList(null);
    }

    /**
     * 查询所有的车友会
     * @return
     */
    public List<Cheyouhui> selectAllCheYouHui(){
        return cheyouhuiService.selectCheyouhuiList(null);
    }
}
